CeleBrick.views.MainView = Ext.extend(Ext.Panel, {
	fullscreen: true,
	layout: 'card',
	cardSwitchAnimation: 'slide',
	initComponent: function() {
		Ext.apply(CeleBrick.views, {
			stageView: new CeleBrick.views.StageView()
		});

		this.on("orientationChange", function() {
			Ext.dispatch({
				controller: CeleBrick.controllers.stageController,
				action: "viewInit"
			});
		}, this, {buffer: 50});

		this.audPlayBack = new Ext.Audio({
			hidden: true,
			loop: true,
			url: "rsc/playback.0.mp3",
			id: "play-back"
		});

		this.tlbTop = new Ext.Toolbar({
			dock: "top",
			title: "CeleBrick"
		});

		this.dockedItems = [this.tlbTop];

		this.items = [
			CeleBrick.views.stageView,
			this.audPlayBack
		];

		CeleBrick.views.MainView.superclass.initComponent.call(this);
	}
});